package com.sanpu.kxe.business.member.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.sanpu.kxe.R;
import com.sanpu.kxe.business.member.bean.MemberBannerOutput;
import com.sanpu.kxe.jump.imageloader.JKImageLoader;
import com.sanpu.kxe.module.banner.holder.MZViewHolder;

/**
 * Description：会员推广广告
 * Created by 薛勇军 on 2018/7/30.
 */

public class MemberBannerViewHolder implements MZViewHolder<MemberBannerOutput> {

    private ImageView mImageView;

    @Override
    public View createView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.item_remote_banner, null);
        mImageView = (ImageView) view.findViewById(R.id.remote_item_image);
        return view;
    }

    @Override
    public void onBind(Context context, int i, MemberBannerOutput image) {
        JKImageLoader.getInstance().displayImage(mImageView.getContext(), image.getImage(),
                mImageView, R.drawable.shape_placeholder);
    }
}
